package timing.ukulele.portal.persistent;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import timing.ukulele.persistent.model.BaseIdWorkerModel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;

@EqualsAndHashCode(callSuper = true)
@Data
@ApiModel(description = "用户")
@TableName("c_user")
public class User extends BaseIdWorkerModel {

    @TableField("username")
    @ApiModelProperty(value="用户名")
    private String username;

    @TableField("password")
    @ApiModelProperty(value = "密码")
    private String password;

    @TableField("name")
    @ApiModelProperty(value="姓名")
    private String name;

    @TableField("active")
    @ApiModelProperty(value = "是否可用：0-不可用，1-可用")
    private Integer active;

    @TableField("role_id")
    @ApiModelProperty(value = "角色id：1-超级管理员，2-管理员，3-普通用户")
    private Integer roleId;

    @TableField(exist = false)
    @ApiModelProperty(value = "业务系统id")
    private List<Long> systemIds;

    @TableField(exist = false)
    @ApiModelProperty(value = "业务系统名称")
    private String systemName;

}